package com.example.state;

import com.example.state.Impi.MybatisDaoImpi;

public class DaoContext {
    private DaoControlState daoControlState;

    public DaoContext() {
        this.daoControlState = new MybatisDaoImpi();
    }

    public void setDaoControlState(DaoControlState daoControlState) {
        this.daoControlState = daoControlState;
    }

    public DaoControlState getDaoControlState() {
        return daoControlState;
    }

    public void changeDaoControlState() {
        daoControlState.nextState(this);
    }

    public String getDaoControlStateInfo() {
        return daoControlState.getStateInfo();
    }
}
